const data=[
    {
        path:"/login",
        component:()=>import("@/views/Login/index.vue"),
        name:"login",
        meta:{
            title:"登录"
        }
    },
    {
        path:"/404",
        component:()=>import("@/views/404/index.vue"),
        name:"404"
    },

    {
        path:"/",
        component:()=>import("@/layout/home/index.vue"),
        name:"root",
        redirect:"/home",
        children:[
            {
                path: "/home",
                component:()=>import("@/views/Home/index.vue"),
                name: "home"
            },
            {
                path:"/user",
                component:()=>import("@/views/User/index.vue"),
                name:"user",
                meta:{
                    title:"用户管理"
                },
                children:[
                    {
                        path:"/user/list",
                        component:()=>import("@/views/User/List/index.vue"),
                        name:"userlist",
                        meta:{
                            title:"用户列表"
                        },
                        children:[

                        ]
                    },
                    {
                        path:"/user/add",
                        component:()=>import("@/views/User/Add/index.vue"),
                        name:"useradd",
                        meta:{
                            title:"用户添加"
                        },
                    },
                    {
                        path:"/user/edit",
                        component:()=>import("@/views/User/Edit/index.vue"),
                        name:"useredit",
                        meta:{
                            title:"用户更新"
                        },
                    },

                    {
                        path:"/user/password",
                        component:()=>import("@/views/User/Password/index.vue"),
                        name:"userpass",
                        meta:{
                            title:"密码管理"
                        },
                    }
                ]
            },
            {
                path:"/permission",
                component:()=>import("@/views/Permission/index.vue"),
                name:"permission",
                meta:{
                    title:"权限管理"
                },
                children:[
                    {
                        path:"/permission/user",
                        component:()=>import("@/views/Permission/User/index.vue"),
                        name:"permissionuser",
                        meta:{
                            title:"用户管理"
                        }
                    },
                    {
                        path:"/permission/role",
                        component:()=>import("@/views/Permission/Role/index.vue"),
                        name:"permissionrole",
                        meta:{
                            title:"角色管理"
                        }
                    },
                    {
                        path:"/permission/menu",
                        component:()=>import("@/views/Permission/Menu/index.vue"),
                        name:"permissionmenu",
                        meta:{
                            title:"菜单管理"
                        }
                    }
                ]
            },

            {
                path:"/system",
                component:()=>import("@/views/System/index.vue"),
                name:"system",
                meta:{
                    title:"系统管理"
                },
                children:[
                    {
                        path:"/system/menu",
                        component:()=>import("@/views/System/Menu/index.vue"),
                        name:"systemmenu",
                        meta:{
                            title:"菜单管理"
                        }
                    }
                ]
            },
        ]
    },
    { path: '/:pathMatch(.*)*', name: '404', component: ()=>import("@/views/404/index.vue"), }
]